package top.cardone.core;

import lombok.AllArgsConstructor;

/**
 * @author yao hai tao
 */
@lombok.Getter
@lombok.Setter
@AllArgsConstructor
@lombok.experimental.Accessors(chain = true)
public class CodeException extends RuntimeException {
    private final Object[] args;

    public CodeException(final String message, final Object[] args, final Throwable cause) {
        super(message, cause);
        this.args = args;
    }

    public CodeException(final String message) {
        this(message, null, null);
    }

    public CodeException(final String message, final Object... args) {
        this(message, args, null);
    }

    public CodeException(final String message, final Throwable cause) {
        this(message, null, cause);
    }
}
